<ul class="task-list">
	<g:each in="${statusHistoryList}" status="i" var="statusHistoryInstance" >
		<li class="item-${statusHistoryInstance.status.name}">
			<g:if test="${statusHistoryInstance.status.name == 'open'}">
				<g:link action="finishedTask" controller="todo"
					params="[taskId:statusHistoryInstance.tasks.id]">
					<span class="open-task">${statusHistoryInstance.tasks.description}</span>
					<span class="date-from-now"><g:dateFromNow date="${statusHistoryInstance.tasks.dateCreated}"/></span>
				</g:link>
			</g:if> <g:elseif test="${statusHistoryInstance.status.name != 'open'}">
				<span class="finish-task">${statusHistoryInstance.tasks.description}</span>
				<span class="date-from-now"><g:dateFromNow date="${statusHistoryInstance.tasks.dateCreated}"/></span>
			</g:elseif>
		</li>
	</g:each>
</ul>
<div class="tasks-list-count">
	<util:remotePaginate controller="todo" action="updateList" total="${tasksCount}"
                                   update="allTasksList" /><span class="task-list-total"> ${tasksCount} task${tasksCount>1?"s":"" }</span>
</div>